/*
 * ShareSinkResultBO.java 
 * 
 * Copyright 2009 Wangfeng Beijing Inc. 
 * All rights reserved. 
 * 
 * Created on 2012-07-11
 */

package com.bjtech.domain.query;

import org.ssi.web.util.QuerySpecTpl;

import com.bjtech.web.util.SelectBean;

/**
 * 功能概述:散热器分摊结果 <br>
 * 
 * @author 王峰
 */

public class ShareSinkResultQuerySpec extends SelectBean {
	/* */
	private Long id;
	/* */
	private Long user_result_id;
	/* */
	private Long sink_no;
	/* */
	private Float power_factor;
	/* */
	private Float couple_factor;
	/* */
	private Float other_factor;
	/* */
	private Long meter_num;
	/* */
	private Long heat_weight;
	/* */
	private Float share_percent;
	/* */
	private Float share_heat_money;
	/* */
	private Float refer_heat_num;

	@Override
	public void queryParamString() {
		StringBuilder fromPart = new StringBuilder(" where 1=1");

		if (this.isAll != null && this.isAll.intValue() != 1) {
			if (QuerySpecTpl.isValid(id)) {
				fromPart.append(" and a.id = ");
				fromPart.append(id);
			}

			if (QuerySpecTpl.isValid(user_result_id)) {
				fromPart.append(" and a.user_result_id = ");
				fromPart.append(user_result_id);
			}

			if (QuerySpecTpl.isValid(sink_no)) {
				fromPart.append(" and a.sink_no = ");
				fromPart.append(sink_no);
			}

			if (QuerySpecTpl.isValid(power_factor)) {
				fromPart.append(" and a.power_factor = ");
				fromPart.append(power_factor);
			}

			if (QuerySpecTpl.isValid(couple_factor)) {
				fromPart.append(" and a.couple_factor = ");
				fromPart.append(couple_factor);
			}

			if (QuerySpecTpl.isValid(other_factor)) {
				fromPart.append(" and a.other_factor = ");
				fromPart.append(other_factor);
			}

			if (QuerySpecTpl.isValid(meter_num)) {
				fromPart.append(" and a.meter_num = ");
				fromPart.append(meter_num);
			}

			if (QuerySpecTpl.isValid(heat_weight)) {
				fromPart.append(" and a.heat_weight = ");
				fromPart.append(heat_weight);
			}

			if (QuerySpecTpl.isValid(share_percent)) {
				fromPart.append(" and a.share_percent = ");
				fromPart.append(share_percent);
			}

			if (QuerySpecTpl.isValid(share_heat_money)) {
				fromPart.append(" and a.share_heat_money = ");
				fromPart.append(share_heat_money);
			}

			if (QuerySpecTpl.isValid(refer_heat_num)) {
				fromPart.append(" and a.refer_heat_num = ");
				fromPart.append(refer_heat_num);
			}

			if (QuerySpecTpl.isValid(this.direction)
					&& QuerySpecTpl.isValid(this.sort)) {
				fromPart.append(" order by ");
				fromPart.append(this.sort);
				fromPart.append(" ");
				fromPart.append(this.direction);
			} else {
				fromPart.append(" order by ");
				fromPart.append("id");
				fromPart.append(" ");
				fromPart.append("asc");

			}
		}
		super.setQueryString(fromPart.toString());
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUser_result_id() {
		return this.user_result_id;
	}

	public void setUser_result_id(Long user_result_id) {
		this.user_result_id = user_result_id;
	}

	public Long getSink_no() {
		return this.sink_no;
	}

	public void setSink_no(Long sink_no) {
		this.sink_no = sink_no;
	}

	public Float getPower_factor() {
		return this.power_factor;
	}

	public void setPower_factor(Float power_factor) {
		this.power_factor = power_factor;
	}

	public Float getCouple_factor() {
		return this.couple_factor;
	}

	public void setCouple_factor(Float couple_factor) {
		this.couple_factor = couple_factor;
	}

	public Float getOther_factor() {
		return this.other_factor;
	}

	public void setOther_factor(Float other_factor) {
		this.other_factor = other_factor;
	}

	public Long getMeter_num() {
		return this.meter_num;
	}

	public void setMeter_num(Long meter_num) {
		this.meter_num = meter_num;
	}

	public Long getHeat_weight() {
		return this.heat_weight;
	}

	public void setHeat_weight(Long heat_weight) {
		this.heat_weight = heat_weight;
	}

	public Float getShare_percent() {
		return this.share_percent;
	}

	public void setShare_percent(Float share_percent) {
		this.share_percent = share_percent;
	}

	public Float getShare_heat_money() {
		return this.share_heat_money;
	}

	public void setShare_heat_money(Float share_heat_money) {
		this.share_heat_money = share_heat_money;
	}

	public Float getRefer_heat_num() {
		return this.refer_heat_num;
	}

	public void setRefer_heat_num(Float refer_heat_num) {
		this.refer_heat_num = refer_heat_num;
	}
}
